using B.S.XZYData.ErrorCode;
using MediatR;

namespace B.S.XZYData.Api.Read.Application.Command.SalesOrder
{
    /// <summary>
    /// 获取产品选择列表命令
    /// </summary>
    public class GetProductSelectCommand : IRequest<ApiResult<ApiPageing<ProductSelectDTO>>>
    {
        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; } = 30;

        /// <summary>
        /// 产品编号
        /// </summary>
        public string? ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string? ProductName { get; set; }
    }

    /// <summary>
    /// 产品选择DTO
    /// </summary>
    public class ProductSelectDTO
    {
        /// <summary>
        /// 产品ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        public string Code { get; set; } = string.Empty;

        /// <summary>
        /// 产品名称
        /// </summary>
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 产品规格
        /// </summary>
        public string? Spec { get; set; }

        /// <summary>
        /// 库存单位
        /// </summary>
        public string? Unit { get; set; }
    }
}
